#ifndef EDIT_WINDOW_H
#define EDIT_WINDOW_H

#include <afxwin.h>
#include <afxdlgs.h>
#include <afxcmn.h>
#include "FileEdit.h"
#include "ErrorListBox.h"
#include "frontend.h"
#include "progovr.h"
#include "MachiningCenterCmdDB.h"

class CEditWindow : public CFrameWnd
{
	enum { IDC_EDIT = 500, IDC_MESSAGELIST = 600, IDC_STATUSBAR = 700 };
	CFileEdit m_edit;
	CErrorListBox m_elb;
	CStatusBarCtrl m_statusBar;
	static const char *s_fileDialogFilter;
	static const char *s_fileDialogExt;
	static UINT s_findMessage;
	CFindReplaceDialog *m_findReplaceDialog;
	CString m_strFindString;
	ProgramOverride m_programOverride;
	MachiningCenterCmdDB m_cmddb;
	FrontEnd m_frontEnd;
public:
	CEditWindow();
protected:
	afx_msg void OnNew();
	afx_msg void OnOpen();
	afx_msg void OnSave();
	afx_msg void OnSaveAs();
	afx_msg void OnExit();
	afx_msg void OnUndo();
	afx_msg void OnCut();
	afx_msg void OnCopy();
	afx_msg void OnPaste();
	afx_msg void OnDelete();
	afx_msg void OnFind();
	afx_msg void OnFindNext();
	afx_msg LONG FindHelper(UINT wParam, LONG lParam );
	afx_msg void OnCompile();
	afx_msg void OnOptions();
	afx_msg void OnAbout();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnInitMenu(CMenu *pmenu);
	afx_msg void HandleDblclkError();
	DECLARE_MESSAGE_MAP()
};

#endif
